home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 9 / Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO / 006a / subscr_1.zip / SUBSCRIB.PPE (.txt) < prev   
PCBoard Programming Language Executable  |  1993-06-03  |  12KB  |  469 lines

  1. ;------------------------------------------------------------------------------
  2. ;                                                   .ss.
  3. ;                                                   `²²'
  4. ;             .,sS$Ss,,s$  .,sS$$$Ss.  .,sS$Ss,,s$ .ss.  .sSs.
  5. ;           .d$$²^°²$$$$'.d$P²°^^²$P'.d$$²^°²$$$$'.$$$' .$$$²Sb,.
  6. ;           $$$'   .$$$' $$$²Sçsµ²' .$$$'   .$$$'.$$$' .$$$'  `$$b.
  7. ;           $$$b,,d$$$' ,$$$b,....,s$$$$b,,d$$$'.$$$;.,$$$'    ;$$$
  8. ;           `²S$$S²²S$$S²°²S$$$$S²°°²S$$$$$$',$$S²°²S$S'.sS$$$P²'
  9. ;                                    .sS²°$$$²²°"'       d²°'
  10. ;                                  .$$²  .$$'
  11. ;                                  $$$.,d$$'
  12. ;                                  `²S$$S²'
  13. ;------------------------------------------------------------------------------
  14. ; P.P.L.X. 2.OO                          (C)1996 - Lone Runner / AEGiS CoRP'96 
  15. ;------------------------------------------------------------------------------
  16. ; PPE 1.OO (plain) - Analysis ON - Postprocessing ON
  17. ;------------------------------------------------------------------------------
  18.  
  19.     Boolean  BOOLEAN001
  20.     Boolean  BOOLEAN002
  21.     Integer  INTEGER001
  22.     Integer  INTEGER002
  23.     Integer  INTEGER003
  24.     Integer  INTEGER004
  25.     Integer  INTEGER005
  26.     Integer  INTEGER006
  27.     Integer  INTEGER007
  28.     Integer  INTEGER008
  29.     Integer  INTEGER009
  30.     Integer  TINTEGER010(3)
  31.     Integer  TINTEGER011(11,3)
  32.     String   STRING001
  33.     String   STRING002
  34.     String   STRING003
  35.     String   STRING004
  36.     String   STRING005
  37.     String   STRING006
  38.     String   STRING007
  39.     String   STRING008
  40.     String   STRING009
  41.     String   STRING010
  42.     String   STRING011
  43.     String   STRING012
  44.     String   STRING013
  45.     String   STRING014
  46.     String   STRING015
  47.     String   STRING016
  48.     String   STRING017
  49.     String   STRING018
  50.     String   STRING019
  51.     String   STRING020
  52.     String   STRING021
  53.     String   STRING022
  54.     String   TSTRING023(11)
  55.     String   STRING024
  56.  
  57. ;------------------------------------------------------------------------------
  58.  
  59.     TINTEGER010(1) = 25
  60.     TINTEGER010(2) = 50
  61.     STRING009 = "USA"
  62.     INTEGER009 = 60
  63.     STRING009 = "USA"
  64.     GetUser
  65.     STRING003 = U_Name()
  66.     STRING003 = Upper(STRING003)
  67.     STRING013 = STRING003
  68.     STRING017 = U_HVPhone
  69.     STRING012 = STRING017
  70.     STRING001 = U_Cmnt2
  71.     STRING001 = RTrim(STRING001, " ")
  72.     STRING021 = Right(STRING001, 6)
  73.     STRING001 = ""
  74.     :LABEL001
  75.     Cls
  76.     PrintLn "@X0EWe accept the following credit cards:"
  77.     PrintLn 
  78.     PrintLn "@X0F   (1) VISA"
  79.     PrintLn "@X0F   (2) MasterCard"
  80.     PrintLn "@X0F   (3) American Express/Optima"
  81.     PrintLn "@X0F"
  82.     PrintLn "@X0F   (A) Abort, I don't have a Credit Card!"
  83.     PrintLn 
  84.     InputStr "Enter the Credit Card Type for this order: (1/2/3/A)", STRING014, 14, 1, "123Aa", 10
  85.     PrintLn 
  86.     If (STRING014 == "1") Goto LABEL003
  87.     If (STRING014 == "2") Goto LABEL004
  88.     If (STRING014 == "3") Goto LABEL005
  89.     STRING001 = "N"
  90.     Beep
  91.     PrintLn 
  92.     InputYN "Are you sure you want to abort this script (Y/N)", STRING001, 12
  93.     If (STRING001 <> "Y") Goto LABEL001
  94.     PrintLn 
  95.     Goto LABEL015
  96.     :LABEL002
  97.     Beep
  98.     PrintLn 
  99.     PrintLn "@X8CThe card number you entered was invalid.  Either you selected"
  100.     PrintLn "the wrong credit card type vs the card number entered, or you did"
  101.     PrintLn "failed to enter the proper number of digits.  Please try again ..."
  102.     PrintLn "@X0E"
  103.     Gosub LABEL018
  104.     Goto LABEL001
  105.     :LABEL003
  106.     InputStr "    Enter the VISA Card Number", STRING010, 14, 16, "1234567890", 2
  107.     PrintLn 
  108.     If (Left(STRING010, 1) <> "4") Goto LABEL002
  109.     If ((Len(STRING010) == 13) || (Len(STRING010) == 16)) Goto LABEL006
  110.     Goto LABEL002
  111.     :LABEL004
  112.     InputStr "   Enter the MasterCard Number", STRING010, 14, 16, "1234567890", 2
  113.     PrintLn 
  114.     If (Left(STRING010, 1) <> "5") Goto LABEL002
  115.     If (Len(STRING010) <> 16) Goto LABEL002
  116.     Goto LABEL006
  117.     :LABEL005
  118.     InputStr "    Enter the AMEX Card Number", STRING010, 14, 15, "1234567890", 2
  119.     PrintLn 
  120.     If (Left(STRING010, 1) <> "3") Goto LABEL002
  121.     If (Len(STRING010) <> 15) Goto LABEL002
  122.     :LABEL006
  123.     InputStr " Expiration date (@X0CMMYY@X0E) format", STRING011, 14, 4, "1234567890", 2
  124.     PrintLn 
  125.     If (Len(STRING011) == 4) Goto LABEL008
  126.     Beep
  127.     PrintLn 
  128.     PrintLn "@X0CError in expiration date format!  Please try again ..."
  129.     PrintLn "@X0E"
  130.     Goto LABEL006
  131.     :LABEL007
  132.     Beep
  133.     PrintLn 
  134.     PrintLn "@X0CError in expiration date!  Please try again ..."
  135.     PrintLn "@X0E"
  136.     Goto LABEL006
  137.     :LABEL008
  138.     INTEGER003 = Left(STRING011, 2)
  139.     INTEGER004 = "19" + Mid(STRING011, 3, 2)
  140.     INTEGER005 = Month(Date())
  141.     INTEGER006 = Year(Date())
  142.     If ((INTEGER003 > 12) || (INTEGER003 < 1)) Goto LABEL007
  143.     If (INTEGER004 > INTEGER006) Goto LABEL009
  144.     If ((INTEGER004 == INTEGER006) && (INTEGER003 >= INTEGER005)) Goto LABEL009
  145.     PrintLn 
  146.     Beep
  147.     PrintLn "@X0CThat card has expired!"
  148.     PrintLn 
  149.     PrintLn "@X0E    Enter (R) to re-enter the card's expiration date."
  150.     PrintLn "@X0E    Enter (D) to use a different credit card."
  151.     PrintLn "@X0E    Enter (A) to abort this order and return."
  152.     PrintLn 
  153.     STRING002 = "R"
  154.     InputStr "Your Choice: (R/D/A)", STRING002, 14, 1, "RDA", 14
  155.     PrintLn 
  156.     If (STRING002 == "R") Goto LABEL006
  157.     If (STRING002 == "D") Goto LABEL001
  158.     Goto LABEL015
  159.     :LABEL009
  160.     InputText "   Enter the Cardholder's Name", STRING013, 14, 50
  161.     PrintLn 
  162.     STRING013 = Upper(STRING013)
  163.     STRING003 = STRING013
  164.     InputStr "Enter the Cardholder's Phone #", STRING012, 14, 13, "1234567890.-()/", 2
  165.     STRING017 = STRING012
  166.     Cls
  167.     PrintLn "@X0EYou have entered the following Credit Card information:"
  168.     PrintLn 
  169.     If ((STRING014 == "1") && (Len(STRING010) == 13)) STRING015 = Left(STRING010, 4) + "-" + Mid(STRING010, 5, 3) + "-" + Mid(STRING010, 8, 3) + "-" + Mid(STRING010, 11, 3)
  170.     If ((STRING014 == "1") && (Len(STRING010) == 16)) STRING015 = Left(STRING010, 4) + "-" + Mid(STRING010, 5, 4) + "-" + Mid(STRING010, 9, 4) + "-" + Mid(STRING010, 13, 4)
  171.     If (STRING014 == "2") STRING015 = Left(STRING010, 4) + "-" + Mid(STRING010, 5, 4) + "-" + Mid(STRING010, 9, 4) + "-" + Mid(STRING010, 13, 4)
  172.     If (STRING014 == "3") STRING015 = Left(STRING010, 4) + "-" + Mid(STRING010, 5, 6) + "-" + Mid(STRING010, 11, 5)
  173.     STRING016 = Left(STRING011, 2) + "/" + Mid(STRING011, 3, 2)
  174.     Print "@X0F   Credit Card #: "
  175.     PrintLn "@X07", STRING015
  176.     Print "@X0F Expiration Date: "
  177.     PrintLn "@X07", STRING016
  178.     Print "@X0FCardholders Name: "
  179.     PrintLn "@X07", STRING013
  180.     Print "@X0F           Phone: "
  181.     PrintLn "@X07", STRING012
  182.     PrintLn 
  183.     STRING001 = "Y"
  184.     InputYN "Is the above information correct (Y/N)", STRING001, 14
  185.     PrintLn "@X07"
  186.     If (STRING001 == "Y") Goto LABEL010
  187.     Goto LABEL001
  188.     :LABEL010
  189.     Cls
  190.     PrintLn "@X0FNow that we have valid credit card information, you need to complete"
  191.     PrintLn "your billing and shipping information.  In order for the script to"
  192.     PrintLn "properly calculate your freight and other functions, you @X0AMUST@X0F enter"
  193.     PrintLn "your State/Province and Country in their appropriate fields.  Please do"
  194.     PrintLn "@X0CNOT@X0F include your State and Zip (Postal) code in the 'City' field."
  195.     PrintLn 
  196.     PrintLn "Customers from outside the US and Canada may need to use the 'Company'"
  197.     PrintLn "or 'City' fields in order to enter all of your information properly."
  198.     PrintLn 
  199.     :LABEL011
  200.     If ((STRING021 == "") || (Left(STRING021, 1) == " ")) STRING021 = "None"
  201.     InputText "Customer # (if applicable)", STRING021, 14, 6
  202.     PrintLn 
  203.     STRING021 = Upper(STRING021)
  204.     InputText "Purchaser Name", STRING003, 14, 50
  205.     STRING003 = Upper(STRING003)
  206.     PrintLn 
  207.     InputStr " Voice Phone #", STRING017, 14, 13, "1234567890.-()/", 2
  208.     PrintLn 
  209.     InputStr "   FAX Phone #", STRING018, 14, 13, "1234567890.-()/", 2
  210.     PrintLn 
  211.     InputText "  Company Name", STRING004, 14, 50
  212.     STRING004 = Upper(STRING004)
  213.     PrintLn 
  214.     InputText "Street Address", STRING005, 14, 50
  215.     STRING005 = Upper(STRING005)
  216.     PrintLn 
  217.     InputText "          City", STRING006, 14, 25
  218.     STRING006 = Upper(STRING006)
  219.     PrintLn 
  220.     InputText "State/Province", STRING007, 14, 2
  221.     STRING007 = Upper(STRING007)
  222.     PrintLn 
  223.     InputText "           ZIP", STRING008, 14, 10
  224.     STRING008 = Upper(STRING008)
  225.     PrintLn 
  226.     InputText "       Country", STRING009, 14, 20
  227.     PrintLn 
  228.     BOOLEAN001 = 0
  229.     STRING009 = Upper(STRING009)
  230.     If ((STRING009 == "USA") && (STRING007 == "")) Gosub LABEL013
  231.     If ((STRING009 == "") && (STRING007 == "")) Gosub LABEL013
  232.     If ((STRING009 == "USA") && (STRING007 == "")) Goto LABEL011
  233.     If ((STRING009 == "") && (STRING007 == "")) Goto LABEL011
  234.     If (STRING009 <> "USA") BOOLEAN001 = 1
  235.     If (STRING009 == "") BOOLEAN001 = 0
  236.     Cls
  237.     PrintLn "@X0EYou have entered the following purchaser information:"
  238.     PrintLn 
  239.     Print "@X0F Customer Number: "
  240.     PrintLn "@X07", STRING021
  241.     Print "@X0F   Customer Name: "
  242.     PrintLn "@X07", STRING003
  243.     Print "@X0F   Voice Phone #: "
  244.     PrintLn "@X07", STRING017
  245.     Print "@X0F     FAX Phone #: "
  246.     PrintLn "@X07", STRING018
  247.     If (STRING004 == "") Goto LABEL012
  248.     Print "@X0F         Company: "
  249.     PrintLn "@X07", STRING004
  250.     :LABEL012
  251.     Print "@X0F         Address: "
  252.     PrintLn "@X07", STRING005
  253.     Print "@X0F                  "
  254.     PrintLn "@X07" + STRING006 + ", " + STRING007 + "  " + STRING008
  255.     Print "@X0F                  "
  256.     PrintLn "@X07", STRING009
  257.     PrintLn "@X07"
  258.     STRING001 = "Y"
  259.     InputYN "Is the above information correct (Y/N)", STRING001, 14
  260.     PrintLn 
  261.     If (STRING001 == "Y") Goto LABEL014
  262.     PrintLn 
  263.     Goto LABEL011
  264.     :LABEL013
  265.     Cls
  266.     Beep
  267.     PrintLn 
  268.     PrintLn "@X0CYou must enter a valid State!  Please re-enter your information ..."
  269.     PrintLn "@X0E"
  270.     Return
  271.     :LABEL014
  272.     Goto LABEL017
  273.     :LABEL015
  274.     PrintLn 
  275.     Beep
  276.     PrintLn "@X0FScript Aborted.  Returning to normal board operations ..."
  277.     Stop
  278.     :LABEL016
  279.     STRING002 = ""
  280.     Goto LABEL020
  281.     :LABEL017
  282.     Cls
  283.     INTEGER009 = 0
  284.     PrintLn 
  285.     DispFile PPEPath() + "sprt.txt", 0
  286.     STRING002 = ""
  287.     InputStr "Support Order Selection: (1-2), (E)xit", STRING002, 14, 1, "12E", 10
  288.     PrintLn 
  289.     If (STRING002 == "") Goto LABEL016
  290.     If (InStr("12", STRING002) < 1) Goto LABEL016
  291.     INTEGER009 = STRING002
  292.     If (STRING002 == "1") STRING022 = "Standard Support"
  293.     If (STRING002 == "2") STRING022 = "Extended Support"
  294.     STRING022 = STRING022 + " for $ "
  295.     PrintLn 
  296.     Print "@X0FSupport Ordered: "
  297.     Print "@X07", STRING022
  298.     STRING024 = TINTEGER010(INTEGER009)
  299.     STRING024 = STRING024 + ".00"
  300.     PrintLn STRING024
  301.     PrintLn 
  302.     STRING001 = "Y"
  303.     InputYN "Is the above correct (Y/N)", STRING001, 14
  304.     PrintLn 
  305.     If (STRING001 == "N") Goto LABEL017
  306.     If (STRING002 == "1") Goto LABEL000
  307.     INTEGER007 = INTEGER007 + 1
  308.     TINTEGER011(INTEGER007, 1) = TINTEGER010(INTEGER009)
  309.     TSTRING023(INTEGER007) = STRING022 + STRING024
  310.     Goto LABEL016
  311.     :LABEL018
  312.     Wait
  313.     Return
  314.     :LABEL019
  315.     INTEGER001 = 0
  316.     INTEGER001 = INTEGER001 + TINTEGER011(INTEGER008, 1)
  317.     INTEGER002 = INTEGER001
  318.     Goto LABEL022
  319.     :LABEL020
  320.     BOOLEAN002 = 0
  321.     If (INTEGER007 <> 0) Goto LABEL021
  322.     Beep
  323.     PrintLn 
  324.     PrintLn "@X0CNothing has been Ordered!"
  325.     PrintLn 
  326.     Gosub LABEL018
  327.     Goto LABEL017
  328.     :LABEL021
  329.     Gosub LABEL019
  330.     PrintLn 
  331.     STRING001 = "Y"
  332.     InputYN "Is the above information correct (Y/N)", STRING001, 14
  333.     PrintLn 
  334.     If (STRING001 == "N") Goto LABEL017
  335.     :LABEL022
  336.     PrintLn 
  337.     STRING001 = "N"
  338.     PrintLn "@X0EBefore actually saving your order, you can leave us two general comment lines"
  339.     InputYN "@X0Econcerning the placement of this order.  Do you wish to do so (Y/N)", STRING001, 14
  340.     If (STRING001 <> "Y") Goto LABEL023
  341.     PrintLn 
  342.     InputText "Comment 1: ", STRING019, 14, 50
  343.     PrintLn 
  344.     InputText "Comment 2: ", STRING020, 14, 50
  345.     PrintLn 
  346.     :LABEL023
  347.     Cls
  348.     DispFile PPEPath() + "legal.txt", 0
  349.     PrintLn 
  350.     Print "    @X0FWe will be charging your credit card in the amount of USD $ "
  351.     Print INTEGER002
  352.     PrintLn ".00"
  353.     PrintLn 
  354.     STRING001 = "Y"
  355.     InputYN "    Do you agree to this purchase (Y/N)", STRING001, 14
  356.     PrintLn 
  357.     If (STRING001 <> "Y") Goto LABEL015
  358.     FPutLn 0, "            User Info: ", U_Cmnt2
  359.     FPutLn 0, "      Customer Number: ", STRING021
  360.     FPutLn 0, ""
  361.     FPutLn 0, "     CREDIT CARD INFO."
  362.     FPutLn 0, "        Credit Card #: ", STRING015
  363.     FPutLn 0, "      Expiration Date: ", STRING016
  364.     FPutLn 0, "    Cardholder's Name: ", STRING013
  365.     FPutLn 0, "   Cardholder's Phone: ", STRING012
  366.     FPutLn 0, ""
  367.     FPutLn 0, "  SOLD TO INFORMATION"
  368.     FPutLn 0, "          Voice Phone: ", STRING017
  369.     FPutLn 0, "            FAX Phone: ", STRING018
  370.     FPutLn 0, "            Purchaser: ", STRING003
  371.     If (STRING004 <> "") FPutLn 0, "              Company: ", STRING004
  372.     FPutLn 0, "              Address: ", STRING005
  373.     FPutLn 0, "       City/State/ZIP: ", STRING006, ", ", STRING007, "  ", STRING008
  374.     FPutLn 0, "              Country: ", STRING009
  375.     FPutLn 0, ""
  376.     FPutLn 0, "PRODUCTS/SERVICES ORDERED"
  377.     INTEGER008 = 1
  378.     :LABEL024
  379.     FPut 0, "         Product # "
  380.     FPut 0, Right(INTEGER008, 2)
  381.     FPutLn 0, ": ", TSTRING023(INTEGER008)
  382.     INTEGER008 = INTEGER008 + 1
  383.     If (INTEGER008 <= INTEGER007) Goto LABEL024
  384.     FPutLn 0, ""
  385.     FPutLn 0, " #'s"
  386.     FPut 0, "            Sub-Total: $ "
  387.     FPut 0, Right(INTEGER001, 5)
  388.     FPutLn 0, ".00"
  389.     FPut 0, "          Grand Total: $ "
  390.     FPut 0, Right(INTEGER002, 5)
  391.     FPutLn 0, ".00"
  392.     FPutLn 0, "      Agree to Charge: YES"
  393.     FPutLn 0, "      Order Comment 1: ", STRING019
  394.     FPutLn 0, "      Order Comment 2: ", STRING020
  395.     FPutLn 0, ""
  396.     FPutLn 0, ""
  397.     FPutLn 0, " Card Authorization #: _______________________"
  398.     FPutLn 0, ""
  399.     FPutLn 0, " Authorization Ref. #: _______________________"
  400.     End
  401.  
  402. ;------------------------------------------------------------------------------
  403. ;
  404. ; Usage report (before postprocessing)
  405. ;
  406. ; ■ Statements used :
  407. ;
  408. ;    1       End
  409. ;    7       Cls
  410. ;    1       Wait
  411. ;    47      Goto 
  412. ;    64      Let 
  413. ;    16      Print 
  414. ;    100     PrintLn 
  415. ;    42      If 
  416. ;    2       DispFile 
  417. ;    6       FPut 
  418. ;    32      FPutLn 
  419. ;    1       GetUser
  420. ;    10      InputStr 
  421. ;    7       InputYN 
  422. ;    5       Gosub 
  423. ;    2       Return
  424. ;    1       Stop
  425. ;    11      InputText 
  426. ;    8       Beep
  427. ;
  428. ;
  429. ; ■ Functions used :
  430. ;
  431. ;    38      +
  432. ;    35      ==
  433. ;    11      <>
  434. ;    2       <
  435. ;    1       <=
  436. ;    2       >
  437. ;    1       >=
  438. ;    7       &&
  439. ;    3       ||
  440. ;    7       Len(
  441. ;    10      Upper()
  442. ;    13      Mid()
  443. ;    10      Left()
  444. ;    4       Right()
  445. ;    1       InStr()
  446. ;    1       RTrim()
  447. ;    2       Date()
  448. ;    1       U_Name()
  449. ;    1       Year()
  450. ;    1       Month()
  451. ;    2       PPEPath()
  452. ;
  453. ;------------------------------------------------------------------------------
  454. ;
  455. ; Analysis flags : No flag
  456. ;
  457. ;------------------------------------------------------------------------------
  458. ;
  459. ; Postprocessing report
  460. ;
  461. ;    0       For/Next
  462. ;    0       While/EndWhile
  463. ;    0       If/Then or If/Then/Else
  464. ;    0       Select Case
  465. ;
  466. ;------------------------------------------------------------------------------
  467. ;                 AEGiS Corp - Break the routines, code against the machines!
  468. ;------------------------------------------------------------------------------
  469.